<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <title>学园 - 全部圈子</title>
    <link rel="stylesheet" type="text/css" href="../web_terminal/trunk/assets/css/reset.css">
    <link rel="stylesheet" type="text/css" href="../web_terminal/trunk/assets/css/base.css">
    <link rel="stylesheet" type="text/css" href="../web_terminal/trunk/assets/css/layout.css">
    <link rel="stylesheet" type="text/css" href="../web_terminal/trunk/assets/css/mycircle.css">
    <link rel="stylesheet" type="text/css" href="../web_terminal/trunk/assets/css/mycenter.css">
    <link rel="stylesheet" type="text/css" href="../web_terminal/trunk/assets/css/circle_content.css">
    <link rel="stylesheet" type="text/css" href="../web_terminal/trunk/assets/css/jquery.fancybox.css">
</head>

<body>
    <div class="navigation">
        <div class="xywrap topinner">
            <a href="#" class="top-link-logo" id="top-link-logo">学园</a>
            <div class="topsearch">
                <form action="" class="top-search-form" method="post">
                    <input type="text" class="top-search-input" id="" name="" autocomplete="off" value="" placeholder="搜索感兴趣的话题" /><i class="icon-search iconfont">&#xe674;</i>
                </form>
            </div>
            <div class="navcontent" id="">
                <ul>
                    <li><a href="#" class="topnavx">消息</a></li>
                    <li><a href="#" class="topnavx">圈子</a></li>
                    <li><a href="#" class="topnavx">动态</a></li> 
                </ul>
            </div>
            <div class="top-nav-selfinfo">
                <a href="#" class="top-nav-userinfo " id="" role="button">
                    <span class="name">Rose</span>
                    <img class="avatar">
                </a>
                <ul class="top-nav-dropdown" id="">
                    <li>
                        <a href="#" id="">个人主页</a>
                    </li>
                    <li>
                        <a href="#" id="">设置</a>
                    </li>
                    <li>
                        <a href="#" id="">退出</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="wrapper">
        <div class="main-content">
            <div class="main-content-inner">
                <div class="home-list">
                    <div class="home-list-title">
						<button class="btn-label">我的圈子</button>
                        <button class="btn-label active">全部圈子</button>
                       	<div id="btn-createCircle" class="btn-create-circle">创建圈子</div>
                    </div>
                    <div class="home-list-content clearfix">
                        <ul id="#circlesMore">
                            <li id="#circle-item">
                                <div class="rep">
                                    <div class="rep-header clearfix">
                                        <div class="rep-title ellipsis fl">
                                            <a href="">
                                            高数圈
                                        </a>
                                        </div>
                                        <div class="rep-concern active fr">
                                            关注圈子
                                        </div>
                                        <div class="rep-join active fr">
                                            申请加入
                                        </div>                                        
                                    </div>
                                    <div class="rep-content-wrapper">
                                        <div class="rep-content clearfix">
                                            <div class="rep-cir-img">
                                                <img src="" class="img-cir">
                                            </div>
                                            <div class="rep-cir-note">
                                                <p>
                                                    <a href="">这是一个链接我也不知道他链接到哪去</a>
                                                    <span>10秒前</span>
                                                </p>
                                                <p>
                                                    <a href="">这是一个链接我也不知道他链接到哪去</a>
                                                    <span>10秒前</span>
                                                </p>
                                                <p>
                                                    <a href="">这是一个链接我也不知道他链接到哪去</a>
                                                    <span>10秒前</span>
                                                </p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="rep bd-top">
                                    <div class="rep-header clearfix">
                                        <div class="rep-title ellipsis fl">
                                            <a href="">
                                            高数圈
                                        </a>
                                        </div>
                                        <div class="rep-concern active fr">
                                            关注圈子
                                        </div>
                                        <div class="rep-join active fr">
                                            申请加入
                                        </div>
                                    </div>
                                    <div class="rep-content-wrapper">
                                        <div class="rep-content clearfix">
                                            <div class="rep-cir-img">
                                                <img src="" class="img-cir">
                                            </div>
                                            <div class="rep-cir-note">
                                                <p>
                                                    <a href="">这是一个链接我也不知道他链接到哪去</a>
                                                    <span>10秒前</span>
                                                </p>
                                                <p>
                                                    <a href="">这是一个链接我也不知道他链接到哪去</a>
                                                    <span>10秒前</span>
                                                </p>
                                                <p>
                                                    <a href="">这是一个链接我也不知道他链接到哪去</a>
                                                    <span>10秒前</span>
                                                </p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <a href="#" class="btn-white btn-more">查看更多</a>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer">
        <div class="foot-content">
            <span class="companyname">上海久炽信息科技有限公司-技术支持</span>
        </div>
    </div>
    <!-- 创建圈子弹窗-->
    <div id="box-createCircle">
        <div class="submit-container">
            <div class="submit-content-title">
                <span class="submit-content-creat">创建新圈子</span>
            </div>
            <div class="submit-content">
                <div class="submit-form">
                    <form action="#" class="form-form">
                        <div class="content-circle-select clear">
                            <div id="topic-create-title" class="topic-create-title">
                                圈子名称:
                            </div>
                            <div class="circle-name-create">
                                <input type="text" class="circle-name-create-input">
                            </div>
                        </div>
                        <div class="content-circle-select clear">
                            <div class="topic-create-title">
                                选择分类:
                            </div>
                            <div id="circle-name-create" class="circle-name-create">
                                <select>
                                    <option>高数</option>
                                </select>
                            </div>
                        </div>
                        <div id="content-topic-create" class="content-topic-create clear">
                            <div class="topic-create-title">
                                <span class="extra-right-toolbar">
                                    <div class="toolbar-edit toolbar-inlineblock">
                                        <i class="toolbar-icon img-icon"></i>
                                    </div>
                                </span> 圈子描述:
                            </div>
                            <div class="topic-create-edit">
                                <div class="topic-edit-wrap">
                                    <textarea class="edit-textarea" style="width: 450px;height: 100px;"></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="submit-finish-part">
                            <button id="submit-create" class="right-btn-decoration btn-blue">创建</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div id="createSuccess">创建成功</div>
    <div id="createFalse">创建失败</div>
    <script type="text/javascript" src="../web_terminal/trunk/assets/js/jquery-1.10.1.min.js"></script>
    <script type="text/javascript" src="../web_terminal/trunk/assets/js/jquery.fancybox.pack.js"></script>
    <script type="text/javascript" src="../web_terminal/trunk/assets/js/jquery.form.js"></script>
    <script>
    $(document).ready(function() {
        $('#informMore').more({
            'address': '<?php echo site_url('')?>',
            'template': '#inform-item',
            'trigger': '.btn-more',
        });
        $('.rep-concern').click(function() {
            var btnStaus = $(this).text();
            if (btnStaus == "关注圈子") {
                $(this).toggleClass("active").text("不再关注");
            } else {
                $(this).toggleClass("active").text("关注圈子");
            }

        })
        $('#btn-createCircle').click(function() {
            $.fancybox({
                href: "#box-createCircle",
                padding: 5,
            });
        })
        $('#submit-create').click(function() {
            $('form').ajaxSubmit({
                    type: 'post',
                    dataType: 'json',
                    beforeSerialize: function() {
                        /* body... */
                    }
                    beforeSubmit: function() {
                        if ($('#topic-create-title input').val() == '') {
                            $('#box-createCircle').after('<span id="create-error" style="color:red;">圈子名称不能为空</span>');
                            return false;
                        }
                        if ($('#circle-name-create option').val() == '') {
                            ('#box-createCircle').after('<span id="create-error" style="color:red;">圈子分类不能为空</span>');
                            return false;
                        }
                        if ($('#content-topic-create textarea').val() == '') {
                            ('#box-createCircle').after('<span id="create-error" style="color:red;">圈子描述不能为空</span>');
                            return false;
                        }
                    }
                }
                success: function(data) {
                    if (data.StatusCode == 200) {
                        $.fancybox({
                            href: "#createSuccess"
                        });
                    } else {
                        $.fancybox({
                            href: "#createFalse"
                        });
                    }
                }
            });
        });
    });
    </script>
</body>

</html>
